1. Field of the Invention
The present invention relates generally to data processing networks, and more particularly to data storage systems and file servers. The present invention relates specifically to reading data from a file in a file server.
2. Description of Related Art
A file server typically includes data storage for storing a file system, and a file system cache memory. File data is organized into data blocks having a certain size, such as 8 kilobytes. In response to a request to read an extent of file data, the file server sequentially reads each block of file data encompassed by the extent. The file server checks whether each such block of file data presently resides in the file system cache memory. If so, the file server obtains the block of file data from the cache memory. If not, the file server fetches the block of file data from the file system in the data storage, and writes the data block into the cache memory.
Multithreaded programming has been used for a variety of applications. In general, a thread is a single, sequential flow of control within a process. Within each thread there is a single point of execution. Each thread has it own set of register values. Therefore, each thread is a single instance of a program routine. A single processor can execute no more than one thread at any given time, but the processor may suspend execution of one thread to begin execution of another thread. The operating system can schedule execution of a thread, suspend execution of a thread, resume execution of a thread, and terminate execution of a thread. The operating system can schedule the execution of threads on a priority basis, and threads of the same priority can be executed on a time-share basis. In this fashion, a multithreaded program can perform computations while waiting for completion of a read or write to disk or while waiting for receipt of a packet from a data network.
There are various standards and software tools to help a programmer writing a multithreaded program. For example, IEEE Std 1003.1—1996 includes a Threads Extension for the Portable Operating Systems Interface (POSIX®) to open systems. This Threads Extension, called POSIX1c, has been included in the Single UNIX Specification, Version 2, as described in “Threads and the Single Unix ® Specification,” Version 2, May 1997, by The Open Group, 8 New England Executive Park, Suite 325 Burlington Mass. 01803-5007, opengroup.org, and in the “Unix® Systems Threads Reference,” also by the Open Group. Another implementation of the IEEE® POSIX® standard is described in “Tru64 UNIX Guide to DECthreads,” July 1999, by the Compaq division of Hewlett-Packard, hp.com.